package cn.sunxyz.behavior.observer;

/**
 * Created by yangrd on 2017/5/15.
 */
public class Client {

    public static void main(String[] args) {
        Observer observer1 = new MyObserverA();
        Observer observer2 = new MyObserverB();
        Subject subject = new ConcreteSubject();
        subject.addObserver(observer1);
        subject.addObserver(observer2);
        subject.doSometing();
    }
}
